#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main()
{
    /*生成随机数的种子*/
    srand(time(NULL));
    int randonNum[10] = {0};
    for (int idx = 0; idx < 10; idx++)
    {
        randonNum[idx] = rand() % 200 + 1;
        printf("randNum[%d] = %d\n", idx, randonNum[idx]);
    }
    /*找到数组里的最大值*/
    int max = 0;
    int max_index = 0;
    for (int idx = 0; idx < 10; idx++)
    {
        if (randonNum[idx] > max)
        {
            max_index = idx;
            max = randonNum[idx];
        }
    }
    printf("最大的是randonNum[%d]=%d\n", max_index, max);
    return 0;
}